build:
	mpicc -Wall -lmpi -c crawler.c -o crawler.o
	gcc -Wall -c crawler_lib.c -o crawler_lib.o
	gcc -Wall -c html_parser.c -o html_parser.o
	gcc -Wall -c baza_date.c -o baza_date.o 
	mpicc -Wall -lmpi crawler_lib.o crawler.o html_parser.o baza_date.o -o crawler -lm -lmysqlclient -L /usr/lib/mysql

clean:
	rm crawler.o crawler_lib.o crawler errors.txt log.txt
	find . -name 'http*' | xargs rm

bd_test:
	gcc -Wall bd_test.c -o bd_test -lm -lmysqlclient -L /usr/lib/mysql
	
bd_clean:
	rm bd_test
	
mining:
	mpicc  -Wall mining.c mining_lib.c baza_date.c crawler_lib.c html_parser.c -o mining  -lm -lmysqlclient -L /usr/lib/mysql
mining_clean:
	rm mining

test:
	gcc -Wall test.c crawler_lib.c -o test
	
parser:
	gcc -Wall -c html_parser.c -o html_parser.o
	gcc -Wall -c parser_test.c -o parser_test.o
	gcc -Wall  parser_test.o html_parser.o -o parser

clean_test:
	rm test
